<?php

/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Sitepage
 * @copyright  Copyright 2010-2011 BigStep Technologies Pvt. Ltd.
 * @license    http://www.socialengineaddons.com/license/
 * @version    $Id: Create.php 2011-05-05 9:40:21Z SocialEngineAddOns $
 * @author     SocialEngineAddOns
 */
class Sitepage_Form_Post_Create extends Engine_Form {
	
	public function init() {
		
		$this->setTitle ( 'Reply' )->setDescription ( 'Post your reply to this topic below.' )->setAction ( Zend_Controller_Front::getInstance ()->getRouter ()->assemble ( array ('action' => 'post', 'controller' => 'topic', 'tab' => Zend_Controller_Front::getInstance ()->getRequest ()->getParam ( 'tab', null ) ), 'sitepage_extended', true ) );
		
		$this->addElement ( 'Textarea', 'body', array ('label' => 'Body', 'allowEmpty' => false, 'required' => true, 'filters' => array (new Engine_Filter_Censor (), new Engine_Filter_HtmlSpecialChars () ) ) );
		
		$this->addElement ( 'Checkbox', 'watch', array ('label' => 'Send me notifications when other members reply to this topic.', 'value' => '1' ) );
		
		$this->addElement ( 'Button', 'submit', array ('label' => 'Post Reply', 'ignore' => true, 'type' => 'submit', 'decorators' => array ('ViewHelper' ) ) );
		
		$this->addElement ( 'Hidden', 'topic_id', array ('order' => '920', 'filters' => array ('Int' ) ) );
		
		$this->addElement ( 'Hidden', 'ref' );
	}

}

?>